/** @format */

import RoleManager from '@/pages/RoleManager';
import UserManager from '@/pages/UserManager';
import AuthManager from '@/pages/AuthManager';
import { Route, Switch } from 'react-router-dom';

export const routerList = [
  {
    name: '员工管理',
    path: '/layout/userManager',
    component: UserManager,
  },
  {
    path: '/layout/roleManager',
    name: '角色管理',
    component: RoleManager,
  },
  {
    name: '权限管理',
    path: '/layout/authManager',
    component: AuthManager,
  },
];

export const getRouterList = () => (
  <Switch>
    {routerList.map((item) => (
      <Route key={item.path} path={item.path} component={item.component} />
    ))}
  </Switch>
);
